package com.shop.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.alibaba.fastjson.JSONObject;
import com.shop.core.util.MD5Util;

@Controller
public class LoginController {

	@RequestMapping(value = "login")
	public ModelAndView login() {
		String pass = MD5Util.MD5Encode("密码") + "密码字母转数字" + "注册时间转数字" + "自定义排序" + "自定义算法";
		System.out.println(pass);
		return new ModelAndView();
	}

	@RequestMapping(value = "ajax")
	@ResponseBody
	public Object ajax() {
		JSONObject job = new JSONObject();
		job.put("name", "小王");
		job.put("success", true);
		return job;
	}
}
